<template>
    <div v-if="ishow">
      <el-row class="mb-3">
          <el-col class="tittle">
            <div class="tittle_dian"></div><span >申请部门信息</span> 
          </el-col>
      </el-row>
      <el-row class="mb-4">
          <el-col :span="24">
            <el-descriptions border :column="2">
              <el-descriptions-item label="办案区" :width="140">{{formData.policeareaname}}</el-descriptions-item>
              <el-descriptions-item label="办案部门" :width="140">{{formData.depname}}</el-descriptions-item>
              <el-descriptions-item label="承办人">{{formData.askerName}}</el-descriptions-item>
              <el-descriptions-item label="申请进入办案区时间">{{formData.startdate}}</el-descriptions-item>
              <el-descriptions-item label="申请离开办案区时间">{{formData.enddate}}</el-descriptions-item>
              <el-descriptions-item label="申请使用功能房名称及数量">{{formData.roomdetail}}</el-descriptions-item>
            </el-descriptions>
          </el-col>
      </el-row>
      <el-row class="mb-4">
          <el-col class="tittle">
            <div class="tittle_dian"></div><span >案件情况</span> 
          </el-col>
      </el-row>
      <el-row class="mb-4">
          <el-col :span="24">
            <el-descriptions border :column="2">
              <el-descriptions-item label="案件名称" :width="140">{{ formData.jwApplydetailList?.[0]?.caseName || ''}}</el-descriptions-item>
              <el-descriptions-item label="姓名" :width="140">{{ formData.jwApplydetailList?.[0]?.userName || '' }}</el-descriptions-item>
              <el-descriptions-item label="性别">
                  <!-- <dict-tag :options="nj_sex" :value="formData.jwApplydetailList[0].userSex"/> -->
                  <dict-tag :options="nj_sex" :value="formData.jwApplydetailList?.[0]?.userSex || ''"/>
              </el-descriptions-item>
              <el-descriptions-item label="涉案人身份">
                <dict-tag :options="nj_sheanren_type" :value="formData.jwApplydetailList?.[0]?.userType || ''"/>
                <!-- <dict-tag :options="nj_sheanren_type" :value="formData.jwApplydetailList[0].userType"/> -->
              </el-descriptions-item>
              <el-descriptions-item label="年龄">{{ formData.jwApplydetailList?.[0]?.userAge || '' }}</el-descriptions-item>
              <el-descriptions-item label="身份证号">{{ formData.jwApplydetailList?.[0]?.userCardcode || '' }}</el-descriptions-item>
              <el-descriptions-item label="民族">{{ formData.jwApplydetailList?.[0]?.userNation || '' }}</el-descriptions-item>
              <el-descriptions-item label="身体状况">{{ formData.jwApplydetailList?.[0]?.userHealthy || '' }}</el-descriptions-item>
              <el-descriptions-item label="备注">{{ formData.jwApplydetailList?.[0]?.userremark || '' }}</el-descriptions-item>
            </el-descriptions>
          </el-col>
      </el-row>
      <el-row class="mb-4">
          <el-col class="tittle">
            <div class="tittle_dian"></div><span >承办审批意见</span> 
          </el-col>
      </el-row>
      <el-row class="mb-4">
          <el-col :span="24">
            <el-descriptions border :column="2">
              <el-descriptions-item label="承办人意见" :span="4">{{formData.askdetail}}</el-descriptions-item>
              <el-descriptions-item label="承办部门审批领导意见"  :span="4">{{formData.approvaldetail}}</el-descriptions-item>
              <el-descriptions-item label="法警部门审核内容" :width="140">{{formData.fjdetail}}</el-descriptions-item>
              <el-descriptions-item label="法警部门审核时间" :width="140">{{formData.fjdate}}</el-descriptions-item>
              <el-descriptions-item label="分管领导审批内容" :width="140">{{formData.leaderdetail}}</el-descriptions-item>
              <el-descriptions-item label="分管领导审核时间">{{formData.leaderdate}}</el-descriptions-item>
            </el-descriptions>
          </el-col>
      </el-row>
    </div>
</template>
<script setup>
import {getCurrentInstance, onMounted} from "vue";
const {proxy} = getCurrentInstance()
import {getBAApplyInfo} from "@/api/BAApply/BAApply";

const {nj_sex, nj_sheanren_type,} = proxy.useDict('nj_sex', 'nj_sheanren_type')

const ishow = ref(false)
const props = defineProps({
  data: {
    type: Object,
    required: true, // 如果这个属性是必需的
  },
})
const formData = ref({
  jwApplydetailList:[{
    caseName:null,
  }]
})
onMounted(() => {
  nextTick(() => {
    ishow.value = true
  })
  if (props.data && props.data.jw_apply_id) {
    // 调用接口获取详细数据
    getApplyDetailInfo(props.data.jw_apply_id);
  }
})
// 获取办案中心信息详情
const getApplyDetailInfo = async () => {
    await getBAApplyInfo(props.data.jw_apply_id).then(res => {
      formData.value = res.data
    })
}

</script>
<style>
  .tittle {display: flex;display: inline-flex;align-items: center;color: #0077B9;}
  .tittle_dian{width: 5px;height: 16px;margin-right: 10px;background: #0077B9;}
</style>